<%= error_messages_for 'category' %>
<div id=create_category>
  <% form_for @category do |f| %>
    <p> Name: <%= f.text_field :name %>                                           </p>
    <p> Parent category: <%= f.select :parent_id, @categories, :selected => @selected_parent_category_id %>  </p>       
    <p> <%= submit_tag "Update category" %>                                       </p>
  <% end %>
</div>

<div id=links_section>
  <%= link_to 'Back to \'List of Categories\'', categories_path %>
</div>